1. Field of the Invention
The present invention relates to an image processing method and image processing program for images acquired by means of an imaging device, and more particularly relates to an image processing method and image processing program for judging whether or not a moving object is contained in an image. The image processing program of the present invention is applied to an image processing device that successively images different imaging regions a plurality of times during an imaging period; this program detects the presence or absence of imaging of a moving object during the imaging period.
2. Description of the Related Art
FIG. 9 is a schematic perspective view of an account book/sales slip reading device as an example of an imaging device. In this account book/sales slip reading device, a document 14 such as an account book, sales slip or the like that is placed on a carrying stand 12 is imaged by means of an imaging element 10 utilizing a CCD (charge-coupled device) or the like, and the image thus acquired is subjected to character recognition utilizing OCR (optical character reader) processing by a computer device, so that the imaged account book, sales slip or the like is read.
Accordingly, since high-resolution imaging is required, imaging is performed with the CCD shifted a plurality of times (using a so-called “pixel shift method”) in the case of an account book/sales slip reading device which has a relatively small-capacity CCD, so that a high resolution comparable to that of an image obtained by means of a large-capacity CCD is obtained.
FIGS. 10A and 10B are diagrams that illustrate this pixel shift method. For example, in the case of a CCD with 500,000 pixels, only an image equivalent to 500,000 pixels can be obtained by a single imaging; however, by driving the CCD upward and downward and to the left and right by the pixel shift method so that imaging is performed with the imaging region divided into nine imaging operations, an image equivalent to 4,500,000 pixels can be obtained.
The parts indicated by {circle around (1)} in FIG. 10A are the parts imaged in a single imaging (equivalent to 500,000 pixels); in order to create an image of 4,500,000 pixels, imaging is performed with spaces (parts indicated by O) left. Then, after the parts indicated by {circle around (1)} have been imaged one time, an image of 4,500,000 pixels (500,000 pixels×9) can be obtained by driving the CCD so that the parts indicated by {circle around (2)} through {circle around (9)} are successively imaged as shown in FIG. 10B, and combining these images into a whole. Furthermore, the number of times that imaging is performed is not limited to nine times; it is sufficient if imaging is performed the number of times that produces the required resolution, such as two times, four times or the like.
OCR processing can be utilized by obtained a high-resolution image by imaging utilizing the abovementioned pixel shift method. However, if moving objects other than documents such as account books, sales slips or the like (which are static objects) are contained in the image, there may be cases in which normal character recognition cannot be performed from the image. In the case of an account book/sales slip reading device, for example, there may be cases in which imaging is erroneously performed after the account book, sales slip or the like has been placed on the carrying stand 12 by the user but before the user's hand (see FIG. 9) has been removed from the carrying stand 12, so that the user's hand is superimposed on this account book, sales slip or the like during imaging. If a moving object such as the user's hand (see number 16 in FIG. 9) is thus contained in the image, erroneous recognition or erroneous operation occurs in the OCR processing. Especially in the case of an account book/sales slip reading device using the pixel shift method, imaging is performed a plurality of times; as a result, the imaging period is relatively long, and the probability of a moving object being present in the imaging region during the imaging period is relatively high.
Thus, in order to perform OCR processing, it is necessary that only documents such as account books or sales slips (static objects) be contained in the image. In cases where a moving object is erroneously contained in the image, it is desirable that OCR processing not be performed, and that processing that urges the user to perform imaging again be performed.